------ 刷新自制 界面用的。（订餐套件等）

local ContainerWidget = _G.require "widgets/containerwidget"

ContainerWidget.Open__npc_old = ContainerWidget.Open
function ContainerWidget:Open(container, doer,...)
    local widget = container.replica.container:GetWidget()
    if widget == nil then
        return
    end

    self:Close()

    if widget.___npc_fn_before then
        widget.___npc_fn_before(self,container,doer,...)
    end

    self:Open__npc_old(container,doer,...)

    if widget.___npc_fn_after then
        widget.___npc_fn_after(self,container,doer,...)
    end
    
    self:Refresh()
end